package net.lab1024.sa.admin.module.app.user.domain;

import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import lombok.Data;
import net.lab1024.sa.base.common.util.SmartVerificationUtil;

/**
 * app小程序用户 新建表单
 *
 * @Author M
 * @Date 2024-10-18 20:45:17
 * @Copyright Transmute实验室
 */

@Data
public class UserAddForm {

    @Schema(description = "用户名", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "用户名 不能为空")
    private String userName;

    @Schema(description = "昵称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "昵称 不能为空")
    private String nickName;

    @Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "手机号码 不能为空")
    @Pattern(regexp = SmartVerificationUtil.PHONE_REGEXP, message = "手机号格式不正确")
    private String phone;

    @Schema(description = "企业", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "企业 不能为空")
    private Long enterpriseId;

    @Schema(description = "性别", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "性别 不能为空")
    private Integer gender;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "状态 不能为空")
    private Boolean disabledFlag;

    @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
    private String remark;

}